﻿using Microsoft.AspNetCore.Mvc;
using System;
using TomNet.AspNetCore.Mvc;
using TomNet.Demo.Web.Settings;
using TomNet.Security;

namespace TomNet.Demo.Web.Controllers
{
    public class HomeController : ApiControllerBase
    {
        private readonly GlobalSetting _globalSetting;

        public HomeController(GlobalSetting globalSetting)
        {
            _globalSetting = globalSetting;
        }

        [HttpGet]
        public IActionResult Get()
        {
            try
            {
                var decode = AesHelper.Decrypt("SGqnCjFtht2/wo8VOKajKY3dwSPeuCsTXMe0NskGuYF79zQUPDnryuRkq7wvEn89n3A5hztnlA3ILgdmnlbP9cqW3pZ7wSPwhWO6gci5SZ0=", "0102030405060708", "0102030405060708");
            }
            catch (Exception)
            {
                throw;
            }
            
            return Ok();
        }

        [HttpGet("cross")]
        public IActionResult TestCross()
        {
            return Ok("允许访问");
        }



    }
}
